package com.ruoyi.know.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户笔记收藏对象 user_note_favorites
 *
 * @author ruoyi
 * @date 2025-02-11
 */
public class UserNoteFavorites extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 收藏表id */
    private Long favoriteId;

    /** 笔记id */
    @Excel(name = "笔记id")
    private Long noteId;

    //笔记
    private Notes notes;

    /** 所属用户id */
    @Excel(name = "所属用户id")
    private Long userId;
    private String userName;

    private SysUser sysUser;

    /** 收藏时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "收藏时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createAt;

    public void setFavoriteId(Long favoriteId)
    {
        this.favoriteId = favoriteId;
    }

    public Long getFavoriteId()
    {
        return favoriteId;
    }
    public void setNoteId(Long noteId)
    {
        this.noteId = noteId;
    }

    public Long getNoteId()
    {
        return noteId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Notes getNotes() {
        return notes;
    }

    public void setNotes(Notes notes) {
        this.notes = notes;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setCreateAt(Date createAt)
    {
        this.createAt = createAt;
    }

    public Date getCreateAt()
    {
        return createAt;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public SysUser getSysUser() {
        return sysUser;
    }

    public void setSysUser(SysUser sysUser) {
        this.sysUser = sysUser;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("favoriteId", getFavoriteId())
            .append("noteId", getNoteId())
            .append("userId", getUserId())
            .append("createAt", getCreateAt())
            .toString();
    }
}
